#用于存放信息的列表
mylist=[{"name":"missZhang","cardnum":"1234567","cardkey":"123456","money":500.00},
		{"name":"missZhang1","cardnum":"1234568","cardkey":"123456","money":500.00},
		{"name":"missZhang2","cardnum":"1234569","cardkey":"123456","money":500.00},
		{"name":"missZhang2","cardnum":"1234560","cardkey":"123456","money":500.00}]

#定义一个输出函数

def myshow (mylist):
	print("尊敬的{:<10}您好:".format(mylist["name"]))
	print(" "*15,)

while True:
	print("="*14,"欢迎登陆xx银行","="*14)
	key1=input("请输入您的账号")
	q=1
	for k in range(len(mylist)+1):
		if key1==mylist[k]["cardnum"]:
			q=0
			print("尊敬的{0:<10}您好:".format(mylist[k]["name"]))
			key2=input("请输入您的密码")
			if key2==mylist[k]["cardkey"]:
				print("|","-"*30,"|")
				print("|    ","1.存储           ","2.取出   |")
				print("|","-"*30,"|")
				key3=input("请输入您的操作:")
				if key3=="1":
					money1=float(input("请输入您存储的金额:"))
					mylist[k]["money"]+=money1
					print("您的账户余额为:{0:<10}".format(mylist[k]["money"]))
				elif key3=="2":
					money2=float(input("请输入您取出的金额："))
					mylist[k]["money"]-=money2
					if mylist[k]["money"]>=0:
						print("您的账户余额为:{0:<10}".format(mylist[k]["money"]))
					elif mylist[k]["money"]<=0:
						print("========您的账户余额不足!!!======")
			elif key2!=mylist[k]["cardkey"]:
				print("===========您输入的密码有误！=========")
		elif k==len(mylist)+1:
			print("==================未查询到此账号！====================")
